package org.aphelie.chronicle.character.ui.editors;

import org.aphelie.chronicle.ArcTopic;
import org.aphelie.chronicle.ui.ChronicleUIPlugin;
import org.aphelie.chronicle.ui.editors.ArcFormEditor;
import org.aphelie.chronicle.ui.forms.ArcFormSection;
import org.aphelie.chronicle.ui.forms.ArcTopicPage;
import org.aphelie.chronicle.ui.forms.ReferenceSection;
import org.aphelie.chronicle.ui.layout.ArcFormLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;

public class AvatarPage extends ArcTopicPage {
	
	private ArcFormSection referenceSection;

	public AvatarPage(ArcFormEditor editor, ArcTopic topic) {
		super(editor, topic);
	}
	
	protected void fillBody() {
		Composite body = managedForm.getForm().getBody();
		body.setLayout(ArcFormLayoutFactory.createFormPaneTableWrapLayout(true, 2));
		ChronicleUIPlugin.getDefault().setCompositeBackgroundColor(body);
		fillLeft(body);
		fillRight(body);
	}
	
	@Override
	protected void fillLeft(Composite left) {
		referenceSection = new ReferenceSection(this, left, SWT.NULL);
		managedForm.addPart(referenceSection);
	}

}
